<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>考试安排详情</title>
</head>
<body bgcolor="#d3eaef" >
      <fieldset style="width:50%; margin-left: 25%; margin-top:5%">
		  <legend style="font-size: 25px; text-align:center">考试安排详情</legend>
		   <c:forEach items="${explan }" var="explandetail" varStatus="v">
		   <table border="0" style="font-size: 16px; width:100%; text-align:left">
		    <tr>
		      <th>试卷名称:</th>
		      <th> <font color="#696969">${explandetail.paperName }</font></th>
		    </tr>
		    <tr>
		      <th colspan="3"><hr></th>
		    </tr>
		    <tr>
		      <th>考试教室:</th>
		      <th> <font color="#696969">${explandetail.exam_Classroom}</font></th>
		    </tr>
		    <tr>
		      <th colspan="3"><hr></th>
		    </tr>
		    <tr>
		      <th>考试时间段:</th>
		      <th> <font color="#696969"><fmt:formatDate value="${explandetail.exam_Time_Start }" pattern="M月dd日 H小时m分"/>
	             —　<fmt:formatDate value="${explandetail.exam_Time_Stop }" pattern="M月dd日 H小时m分"/>
	          </font></th>
		    </tr>
		    <tr>
		     <th colspan="3"><hr></th>
		    </tr>
		    <tr>
		      <th>考试班级:</th>
		      <th> <font color="#696969">${explandetail.className}</font></th>
		    </tr>
		    <tr>
		      <th colspan="3"><hr></th>
		    </tr>
		    <tr>
		      <th>补考学员:</th>
		      <th><font color="#696969"><c:forEach items="${usersName }" var="userName">
		            <dl>
		              <dt>学员${userName.id}:</dt>
		              <dd>${userName.name}</dd>
		            </dl>
			      </c:forEach></font>
			  </th>
		    </tr>
		    <tr>
		      <th colspan="3"><hr></th>
		    </tr>
		    <tr>
		      <th>操作者:</th>
		      <th> <font color="#696969">${explandetail.managerName}</th>
		    </tr>
		    <tr>
		      <th colspan="3"><hr></th>
		    </tr>
		    <tr>
		      <th>操作时间:</th>
		      <th> <font color="#696969">${explandetail.operate_time}</font></th>
		    </tr>
		    <tr>
		      <th colspan="3"><hr></th>
		    </tr>
		    <tr>
		      <th>试卷名称:</th>
		      <th> <font color="#696969">${explandetail.paperName }</font></th>
		    </tr>
		    <tr>
		      <th colspan="3"><hr></th>
		    </tr>
		    <tr>
		      <th>状　　态:</th>
		      <th><font color="#696969">
		         <c:set var="state" value="${explandetail.state}"></c:set>
				  <c:if test="${state == 1 }">有效</c:if>
				  <c:if test="${state == 2}">待生效</c:if>
				  <c:if test="${state == 3 }">已删除</c:if>
				  </font>
		      </th>
		    </tr>
		    <tr>
		      <th colspan="3"><hr></th>
		    </tr>
		    <tr>
		      <th>备　　注:</th>
		      <th > <font color="#696969">${explandetail.memo}</font></th>
		    </tr>
		    <tr>
	          <th colspan="3"><a href="<%=request.getContextPath()%>/teach/examplan/ExamPlanServlet?command=list" style="text-decoration:none;">返回主页</a></th>
	       </tr>
		  </table>
		 </c:forEach>
	  </fieldset>
 <script type="text/javascript">

    function updateState(state)
      {
        var state = document.getElementById("state").value;
        window.location.href="<%=request.getContextPath()%>/teach/examplan/ExamPlanServlet?command=updateState&state="+state; 
      }
     
</script>
</body>
</html>